﻿using System;
using System.Windows.Data;

namespace SLTestHarness
{
	public class FormattingConverter : IValueConverter
	{
		public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
		{
			string formatString = parameter as string;
			return string.Format("{0:" + formatString + "}", value);
		}

		public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
		{
			throw new NotImplementedException();
		}
	}
}
